package com.panfeng.xcloud.boss.provider.member.service.impl;

import com.panfeng.xcloud.boss.provider.member.dao.mapper.BackInfoManageMapperExt;
import com.panfeng.xcloud.boss.provider.member.dto.request.QueryCommonInfoReqDTO;
import com.panfeng.xcloud.boss.provider.member.dto.response.QueryCommonInfoRespDTO;
import com.panfeng.xcloud.boss.provider.member.service.IUserCommonInfoService;
import com.panfeng.xcloud.dao.member.entity.BackInfoManage;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@Slf4j
public class UserCommonInfoServiceImpl implements IUserCommonInfoService {

    @Autowired
    private BackInfoManageMapperExt backInfoManageMapperExt;

    /**
     * 查询用户公共信息
     *
     * @param queryCommonInfoReqDTO
     * @return
     */
    @Override
    public QueryCommonInfoRespDTO queryCommonInfo(QueryCommonInfoReqDTO queryCommonInfoReqDTO) {
        QueryCommonInfoRespDTO queryCommonInfoRespDTO = new QueryCommonInfoRespDTO();

        List<BackInfoManage> infos = backInfoManageMapperExt.queryCommonInfo(queryCommonInfoReqDTO);

        queryCommonInfoRespDTO.setInfos(infos);
        return queryCommonInfoRespDTO;
    }

}
